package com.team_project.boot.mapper;

import com.team_project.boot.entity.Auther;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface AuctherMapper {
    @Select("select id,url,type,title,mintitle,content,created from auther order by created desc")
    List<Auther> selectAll();
    @Insert("insert into auther(id,url,type,title,mintitle,content) values(null,#{url},#{type},#{title},#{mintitle},#{content})")
    void insert(Auther auther);
    @Delete("delete from auther where id=#{id}")
    void deleteByid(Integer id);
}
